package fr.cie.blog.beans;

import java.util.ArrayList;
import java.util.List;

/**
 * Article fo blog.
 * 
 * @author Jee3
 * 
 */
public class Article extends AbstractPublication {

	/**
	 * List of Comment(s) related to the Article.
	 */
	private List<Comment> commentList = new ArrayList<Comment>();
	/**
	 * Category of the Article.
	 */
	private Category category;

	/**
	 * @return the category
	 */
	public final Category getCategory() {
		return category;
	}

	/**
	 * @return the commentList
	 */
	public final List<Comment> getCommentList() {
		return commentList;
	}

	/**
	 * @param pCategory
	 *            the category to set
	 */
	public final void setCategory(final Category pCategory) {
		category = pCategory;
	}

	/**
	 * @param pCommentList
	 *            the commentList to set
	 */
	public final void setCommentList(final List<Comment> pCommentList) {
		commentList = pCommentList;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public final String toString() {
		return "Article [getContent()=" + getContent() + "comments ?"
				+ getCommentList() + "]";
	}

}